package com.example.demo_news.Repository;

import java.util.List;

import com.example.demo_news.entity.News;

import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface NewsRepository extends JpaRepository<News, Integer>{
    public News findNewsById(Integer id);
    //根据id查找新闻
    public List<News>findNewsByType(Integer type);
    //根据新闻类型查找新闻
    public List<News>findNewsByofficialAccountId(Integer officialAccountId);
    //根据公众号主体查找新闻
    //分页查询
}
